import request from '@/config/axios'

export interface PayVO {
                    orderId: number
                    dueAmount: number
                    realAmount: number
                    status: number
                    id: number
}

// 查询支付单列表
export const getPayPage = async (params) => {
  return await request.get({ url: '/vrs/pay/page', params })
}

// 查询支付单详情
export const getPay = async (id: number) => {
  return await request.get({ url: '/vrs/pay/get?id=' + id })
}

// 新增支付单
export const createPay = async (data: PayVO) => {
  return await request.post({ url: '/vrs/pay/create', data })
}

// 修改支付单
export const updatePay = async (data: PayVO) => {
  return await request.put({ url: '/vrs/pay/update', data })
}

// 删除支付单
export const deletePay = async (id: number) => {
  return await request.delete({ url: '/vrs/pay/delete?id=' + id })
}

// 导出支付单 Excel
export const exportPayApi = async (params) => {
  return await request.download({ url: '/vrs/pay/export-excel', params })
}